package org.bing.engine.core.domain;

public class ControllerGroupOfDomain extends AbstractEntity {
    private static final long serialVersionUID = 1978L;
    private ControllerGroup group;
    private Domain domain;

    public ControllerGroupOfDomain() {

    }

    public ControllerGroupOfDomain(ControllerGroup grp, Domain dom) {
        this.group = grp;
        this.domain = dom;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder(64);
        if (getId() > 0) {
            sb.append("id:").append(getId()).append(",");
        }
        if (group != null) {
            sb.append("group:" + group.getName()).append(",");
        }
        if (domain != null) {
            sb.append("domain:" + domain.getName());
        }
        return sb.toString();
    }

    public ControllerGroup getGroup() {
        return group;
    }

    public void setGroup(ControllerGroup grp) {
        this.group = grp;
    }

    public Domain getDomain() {
        return domain;
    }

    public void setDomain(Domain domain) {
        this.domain = domain;
    }

}
